<div class="col-sm-12 col-md-12" ng-show="viewIndex == 0">
	<div class="row">
		<div class="col-sm-12 col-md-12">
			<form class="form-custom clearfix">
				<div class="col-sm-2 col-md-2">  
                    <label>数据名称</label>
                    <input class="form-control" type="text" ng-model="params.dataSetName " placeholder="请输入源数据、目标数据名称"/>   
                </div>
				<div class="col-sm-2 col-md-2">
					<label> 数据结构定义</label>
					<select class="form-control" select2 data-live-search="true" ng-model="params.dataDefId"
						ng-options="item.dataDefId as item.dataDefName for item in defs">
						<option value="">请选择</option>
					</select>
				</div>
				<div class="col-sm-2 col-md-2">
					<label>清洗状态</label>
					<select class="form-control" ng-model="params.opStats">
						<option value=''>请选择</option>
<!-- 						<option value='init'>待清洗</option> -->
						<option value='running'>清洗中</option>
						<option value='finished'>清洗成功</option>
						<option value='failure'>清洗失败</option>
					</select>
				</div>
				<div class="col-sm-3 col-md-3">
					<label> 操作日期 </label>
					<div data-datetimepicker="range" range start="params.startTime" end="params.endTime"></div>
				</div>

				<div class="col-sm-2 col-md-3">
					<label>&nbsp;</label>
					<button class="btn btn-info btn-custom" type="button" ng-click="refresh('first' , true)">查询</button>
					<button class="btn btn-primary btn-custom" type="button" ng-click="edit()">设置规则</button>
					<button class="btn btn-info btn-custom" type="button" ng-click="resetQuery()">重置</button>
				</div>
			</form>
		</div>
	</div>

	<table class="table table-striped table-bordered table-condensed index-center table-costom">
		<thead>
			<tr>
				<th>序号</th>
				<th>源数据</th>
				<th>目标数据</th>
				<th>数据结构定义</th>
<!-- 				<th>操作人</th> -->
				<th class="col-datetime-1">操作时间</th>
				<th class="col-status-1">清洗状态</th>
				<th class="col-opt-1">操作</th>
			</tr>
		</thead>
		<tbody>
			<tr class="rowlink" ng-repeat="item in limitArr">
				<td>{{current*limit+$index+1}}</td>
				<td>{{item.set1Name}}</td>
				<td>{{item.resultSetName}}</td>
				<td>{{item.dataDefName1}}</td>
<!-- 				<td>{{item.userName}}</td> -->
				<td>{{item.createDate|date:'yyyy-MM-dd HH:mm'}}</td>
				<td>{{item.opStats|DP_clean}}</td>
				<td><a href="javascript:" data-toggle="modal" data-target="#see" ng-click="preview(item)">详情</a> 
				<a href="javascript:" ng-if="item.opStats=='finished'" ng-click="detail(item)">查看</a>
					<a href="javascript:" ng-if="item.opStats=='finished'" ng-click="report(item);">报告</a>
<!-- 					<a href="javascript:" ng-if="item.opStats=='failure'" ng-click="reExecute(item.ruleId)">重新执行</a> -->
					<a href="javascript:" ng-if="item.opStats=='failure'" ng-click="toRemove(item);" data-target="#dataIntelogRm" data-toggle="modal">删除</a>
				</td>
			</tr>
		</tbody>
	</table>

	<div data-remote-paging="pager" data-params="params" data-refresh="refresh" data-current="current" data-total="total"
		data-data="limitArr" data-limit="limit"></div>

<!-- 删除对话框 -->
<div class="modal fade" id="dataIntelogRm" tabindex="-1" role="dialog" aria-hidden="true">
	<div class="modal-dialog">
		<div class="modal-content">
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
				<h4 class="modal-title">删除数据</h4>
			</div>
			<div class="modal-body">确认要删除此数据么？</div>
			<div class="modal-footer">
				<button type="button" class="btn btn-danger" data-dismiss="modal" ng-click="remove()">确认删除</button>
				<button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
			</div>
		</div>
		<!-- /.modal-content -->
	</div>
	<!-- /.modal-dialog -->
</div>
<!-- /.modal -->
	<div class="modal fade" id="see" tabindex="-1" role="dialog" aria-hidden="true">
		<div class="modal-dialog">
			<div class="modal-content">
				<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
					<h4 class="modal-title">查看清洗方式</h4>
				</div>
				<div class="modal-body">
					<div class="row">
						<div class="col-sm-12 col-md-12">
							<table class="table table-striped table-bordered table-condensed">
								<thead>
									<tr>
										<th>清洗方式</th>
										<th>字段</th>
									</tr>
								</thead>
								<tbody>
									<tr class="rowlink" ng-repeat="item in previewData.result track by $index">
										<td>{{item.ruleName}}</td>
										<td>{{item.columnNames.join(',')}}</td>
									</tr>
								</tbody>
							</table>
						</div>
					</div>
				</div>
				<div class="modal-footer">
					<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
				</div>
			</div>
			<!-- /.modal-content -->
		</div>
		<!-- /.modal-dialog -->
	</div>
</div>

<div selecter-data-set="DsSelector"></div>
<div view-data-set="showDataSetInfo"></div>
<div ng-include="'templates/dataIntegration/dataClean/manage-extends.html'"></div>